#! /usr/bin/python3

class Solution:
    def validPalindrome(self, s: str) -> bool:
        i = 0
        j = len(s) - 1

        while i <= j:
            if s[i] != s[j]:
                return self.validPalindrome0(s[i+1:j+1]) or self.validPalindrome0(s[i:j]) 
            i = i + 1
            j = j - 1    
        return True

    def validPalindrome0(self,s: str) -> bool:
        print("str is :" , s)
        i = 0
        j = len(s) -1 
        while i <= j:
            if s[i] != s[j]:
              return False
            i = i + 1
            j = j - 1
        return True

sol =  Solution()          
cases = ("aba","","a","abcd","andffdasfadsfa","andfddfdna","abc")
cases = ("abc","")
for case in cases:
    print("case, ",case, " is palinedrome:", sol.validPalindrome(case))